// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */

/**
 * 订单管理
 */
// // 交易订单
// import Goods from '@/views/order/Goods';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
// 角色管理
import Staff from '@/views/system/Staff';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';
// 商品管理
import motoInfoManagement from '@/views/motoManagement/motoInfoManagement';
import motoBrandManagement from '@/views/motoManagement/motoBrandManagement';

// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [
        {
            path: '/',
            name: '',
            component: login,
            hidden: false,
            meta: {
                requireAuth: false
            }
        },

        {
            path: '/login',
            name: '登录',
            component: login,
            hidden: true,
            meta: {
                requireAuth: false
            }
        },
        {
            path: '/index',
            name: '首页',
            component: index,
            iconCls: 'el-icon-tickets',
            children: [{
                path: '/charts/statistics',
                name: '',
                component: statistics,
                meta: {
                    requireAuth: true
                }
            },
            // {
            //     path: '/order/Goods',
            //     name: '交易订单',
            //     component: Goods,
            //     meta: {
            //         requireAuth: true
            //     }
            // },
            {
                path: '/motoManagement/motoInfoManagement',
                name: '车辆信息管理',
                component: motoInfoManagement,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/motoManagement/motoBrandManagement',
                name: '车辆品牌管理',
                component: motoBrandManagement,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/system/user',
                name: '用户管理',
                component: user,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/system/Staff',
                name: '员工管理',
                component: Staff,
                meta: {
                    requireAuth: true
                }
            },
            {
                path: '/druid/login',
                name: '监控查询',
                component: druidLogin,
                meta: {
                    requireAuth: true
                }
            },
                // {
                //     path: '/charts/statistics',
                //     name: '数据可视化',
                //     component: statistics,
                //     meta: {
                //         requireAuth: true
                //     }
                // },
            ]
        }]
})